package cn.fanyamin.util.collection;

import java.util.LinkedList;


/**
 * class LinkedStack
 * 
 * @author <a href="mailto:walter.fan@gmail.com">Walter Fan</a>
 * @version 1.0 12/03/2008
 */
public class LinkedStack<T> {
    private LinkedList<T> myList =new LinkedList<T>() ;
    public void push(T data) {
        myList.addFirst(data);
    }
    public T peek() {
        return myList.getFirst();
    }
    
    public T pop() {
        return myList.removeFirst();
    }
    
    public boolean isEmpty() {
        return myList.isEmpty();
    }
    
    public void clear() {
        myList.clear();
    }
    
}